package Store;

import Visualization.ProjectVis;

public class Project {
	private String name;	
	public ClassDiagram inputCD;
	public ClassDiagram outputCD;
	public StateObserverInv stateObserverInv;
	public StateMachine stateMachine;
	public EventCondReact eventCondReact;
	public StateTable stateTable;
	
	public Project()
	{
		name=new String();
		inputCD=new ClassDiagram();
		outputCD= new ClassDiagram();
		stateObserverInv=new StateObserverInv();
		stateMachine=new StateMachine();
		eventCondReact=new EventCondReact();
		stateTable=new StateTable();
	}
	
	public Project(	String aname, ClassDiagram ainputCD, ClassDiagram aoutputCD, 
					StateObserverInv astateObserverInv, StateMachine astateMachine, 
					EventCondReact aeventCondReact, StateTable astateTable)
	{
		name=aname;
		inputCD=ainputCD;
		outputCD=aoutputCD;
		stateObserverInv=astateObserverInv;
		stateMachine=astateMachine;
		eventCondReact=aeventCondReact;
		stateTable=astateTable;
	}
	
	public ClassDiagram getInputCD() {
		return inputCD;
	}

	public ClassDiagram getOutputCD() {
		return outputCD;
	}

	public StateObserverInv getStateObserverInv() {
		return stateObserverInv;
	}

	public StateMachine getStateMachine() {
		return stateMachine;
	}

	public EventCondReact getEventCondReact() {
		return eventCondReact;
	}

	public StateTable getStateTable() {
		return stateTable;
	}

	public void mkProject(String aName) {
		name=aName;
		inputCD = new ClassDiagram();
		outputCD = new ClassDiagram();
		stateObserverInv = new StateObserverInv();
		stateMachine = new StateMachine();
		eventCondReact = new EventCondReact();
		stateTable = new StateTable();
	}

	public void setSM(StateMachine aSn) {
		stateMachine = aSn;
	}

	public void setUotputCD(ClassDiagram aCd) 
	{
		outputCD=aCd;
	}
	
	public String getName()
	{ 
		return name;
	}
	
	public ProjectVis vis()
	{
		return new ProjectVis(name, stateMachine.vis(), outputCD.vis());
	}
	
	public void clear()
	{
		outputCD= new ClassDiagram();
		stateObserverInv= new StateObserverInv();
		stateMachine= new StateMachine();
		eventCondReact= new EventCondReact();
		stateTable= new StateTable();
	}
}